package com.example.mapper;

import com.example.pojo.Student;
import com.example.pojo.User;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface StudentMapper {

    //新增学员
    @Insert("insert into t_manager_student(stu_name,from_place,parent_phone,current_grade,is_first,login_id)" +
            "value (#{stuName},#{fromPlace},#{parentPhone},#{currentGrade},#{isFirst},#{loginId})")
    void insertStudent(Student student);

    //修改学员
    void updateStudent(Student student);

    //查询学员列表
    @Select("select * from t_manager_student")
    List<Student> list();

    //根据id查询学员
    @Select("select * from t_manager_student where id = #{id}")
    Student queryById(Integer id);

    //审核学员
    @Update("update t_manager_student set status = '已审核' where id = #{id}")
    void ApproveStudent(Integer id);

    //批量审核学员
    void batchApproveStudent(@Param("ids") List<Integer> ids);

    //批量导入学员
    void batchImproveStudent(@Param("list1") List<Student> list1);

}
